Skip to content

Claude/csv loading postgres migration qvkl4l - #40

Merged
amar-python merged 7 commits into
mainfrom
claude/csv-loading-postgres-migration-qvkl4l
Aug 2, 2026
Merged

Claude/csv loading postgres migration qvkl4l#40
amar-python merged 7 commits into
mainfrom
claude/csv-loading-postgres-migration-qvkl4l

Conversation

@amar-python

Copy link
Copy Markdown
Owner

No description provided.

amar-python and others added 7 commits July 31, 2026 18:41
- api/config.py: add allow_destructive setting (reads API_ALLOW_DESTRUCTIVE env
  var, defaults true; set false in prod to block table drops)
- api/db.py: bootstrap audit_log table so every DELETE is recorded persistently
- api/routers/csv_routes.py: three-layer DELETE guard: 403 gate, schema whitelist
  via information_schema before DROP, INSERT into audit_log after each delete
- tests/test_api_coverage.py: enum constraint violation, NULL in NOT NULL column,
  unknown target table, re-upload replaces registry, DeleteGateUnit 403 unit test

Closes critical bugs: DELETE endpoint unguarded, T&E mode test coverage gaps
The startup instruction said 'run from the api/ directory' with
'uvicorn main:app'. Now that all imports are package-relative, the
correct command from the repo root is:
  python -m uvicorn api.main:app --reload --port 8000

scripts/start-api.ps1 was already correct; only the docstring was stale.

Closes #36
@amar-python
amar-python merged commit 2baa878 into main Aug 2, 2026
4 checks passed
@amar-python
amar-python deleted the claude/csv-loading-postgres-migration-qvkl4l branch August 2, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant